package models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import util.JustIdSerializer;

@Entity
@Table(name = "store")
@JsonIgnoreProperties(ignoreUnknown = true)
public class Store extends util.Entity {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	// private ListOfProducts listOfProducts;
	@Column(name = "fast_name")
	private String fastName;

	@Column(name = "complete_name")
	private String completeName;

	@JoinColumn(name = "id_owner")
	@ManyToOne
	@JsonSerialize(using = JustIdSerializer.class)
	private Seller owner;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getFastName() {
		return fastName;
	}

	public void setFastName(String fastName) {
		this.fastName = fastName;
	}

	public String getCompleteName() {
		return completeName;
	}

	public void setCompleteName(String completeName) {
		this.completeName = completeName;
	}

	public Seller getOwner() {
		return owner;
	}

	public void setOwner(Seller owner) {
		this.owner = owner;
	}

	// private GeoRange localization;

}
